package com.itheima.sh.dao;

import com.itheima.sh.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from user where username = #{username} and password = #{password}")
    User login(User user);

    @Select("select * from user where username = #{username}")
    User selectUserByName(String username);

    @Insert("insert into user values (null, #{username}, #{password})")
    void insertUser(User user);
}
